let shUtils = {
    /**
     * 
     * @param {Object} options
     * @author W12
     * 对设置属性的简单封装，使用setState.call(this) 
     */
    setState(options) {
        if (typeof options == "object" && !!options) {
            for (let key in options) {
                this[key] = options[key]
            }
        }
    },
    /**
     * @returns Element
     */
    createEl(canvas){
        if(typeof window.document !=="undefined" && typeof window.window !=="undefined"){
            let el =document.createElement("canvas");
            el.width = canvas.getWidth();
            el.height =canvas.getHeight();
            return el
        }
    }
    
}

export default shUtils